<template>
    <div class="student">
        <h2 @click="showName">学生名称：{{name}}</h2>
        <h2 @click="showXY()">学生年龄：{{age}}</h2>
        <hr>
    </div>
</template>

<script>
    // 引入一个mixin.js
    import { mixin1, mixin2 } from '../mixin.js';

    export default {
        name: 'Student',
        data() {
            console.log(this);
            return {
                name: '张三',
                age: 19,
            }
        },
        mixins: [
            mixin1,
            mixin2
        ]
    }
</script>

<style>
    .student {
        background-color: gray;
    }
</style>